<?php
/**
 * @特惠赚
 * Author: 小谢
 * Date: 2019-5-9
 */
namespace app\api\model;
use think\Model;
class User extends Model {

	/**
     * 查询用户一条信息
     */
    public function getUserInfo($array = array()) {
    	    $condition['mobile']  = $array['mobile'];
    	    $condition['password']= md5($array['password']);
    		$user = User::where($condition)->find();
    		if($user) {
    			return ['status'=>1,'user_id'=>$user['user_id']];
    		}
    		return ['status'=>0];
    }

}
